/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Topka;

import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.CharBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Currency;
import java.util.Iterator;
import java.util.Locale;
import java.util.Random;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

/**
 *
 * @author Asko
 */
public class Tester {

    enum Cars {

        Toyota, Bmw, Porsche, Lexus, Ford, Lada, Fiat, Renault
    }

    static class Sherman extends Thread {

        int i = 1000;

        public Sherman() {
            //  super.start();
        }

        @Override
        public void run() {
            while (i-- > 0) {
                System.out.println("Class sherman is running: " + i);
                try {
                    Thread.sleep(5);
                } catch (InterruptedException ex) {
                    Logger.getLogger(Tester.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
    }

    /**
     * Over head the albatros hangs motionless upon the a
     *
     * @param args
     */
    public static void main(String[] args) throws InterruptedException {
        Random r = new Random();
        for (int i = 0; i < 10; i++) {
            System.out.println("r:" + r.nextGaussian());
        }
        System.exit(0);
        /*try {
            URL url = new URL("http://yandex.ru");
            LineNumberReader r = new LineNumberReader(new InputStreamReader(url.openStream()));
            String s = r.readLine();
            while (s != null) {
                System.out.println(s);
                s = r.readLine();
            }
            System.out.println(r.getLineNumber());
            r.close();
        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
*/

    }
}
